//
//  ViewController.m
//  Hello_OCUnit
//
//  Created by zhudongxia on 15/12/7.
//  Copyright © 2015年 zhudongxia. All rights reserved.
//

#import "ViewController.h"
#import "CounterViewController.h"
#define ACScreenWidth [UIScreen mainScreen].bounds.size.width
@interface ViewController (UnitTest)
- (NSInteger)getSellGroupCount;
- (BOOL)needShowHeader:(NSInteger)section;
@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self addControls];
 [self.navigationController pushViewController:[[CounterViewController alloc]initWithCounter:[[Counter alloc]initWithUserDefault:[NSUserDefaults standardUserDefaults]]] animated:YES];
}

-(void) addControls
{
    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
    button.frame = CGRectMake(30, 200, ACScreenWidth-60, 40);
    [button setTitle:@"跳转至测试界面" forState: UIControlStateNormal];
    button.layer.cornerRadius = 3;
    button.backgroundColor  = [UIColor colorWithRed:215/255.0 green:217/255.0 blue:166/255.0 alpha:1.0];
    button.accessibilityIdentifier = @"pushController";
    [button addTarget:self action:@selector(pushButtonClick) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:button];
}

-(void) pushButtonClick
{
    [self.navigationController pushViewController:[[CounterViewController alloc]initWithCounter:[[Counter alloc]initWithUserDefault:[NSUserDefaults standardUserDefaults]]] animated:YES];
}


@end
